1. Field of the Invention
The invention relates generally to methods and systems in which resources are shared by multiple processes and more specifically relates to improved methods and apparatus for efficiently managing and mapping shared resources for use by multiple tasks operating in parallel in a document presentation environment.
2. Discussion of Related Art
In a variety of the document presentation systems such as printing systems, it is common to utilize a plurality of tasks operating concurrently or substantially in parallel to process document data for purposes of generating the output presentation data. The output presentation data is then applied to an appropriate presentation device such as a display or a printing system. In processing the document data, the plurality of tasks each perform some portion of the processing of the entire document or collection of documents. The multiple tasks may be operable concurrently sharing processing time of a number of processors or may be operable in parallel each with a dedicated processor. Such concurrent or parallel processing improves performance of presentation systems in generating the ultimate presentation data output.
It is common in such multi-tasking environments (whether concurrent or parallel) that the plurality of tasks share access to one or more common resources. Shared resources may include files containing font glyph data, image data, color profile data, text data, presentation control commands, graphics data, barcode data, overlay data, segment data, saved page data, etc. The shared resource may be updated or revised in some manner in the midst of processing a large presentation. For example, a vendor generating a large presentation of invoices to customers may prepare some invoices with a first payment address and other invoices with a different payment address (e.g., an east coast payment processing center versus a west coast payment processing center). The payment address may be defined in a shared resource file used by multiple of the plurality of tasks in processing their respective portions of the total presentation. A first version of the payment address shared resource may be provided as west coast customer invoices are prepared and a second version may be provided when east coast customer invoices are prepared. Or for example, a font or logo image (or any other type of resource) may be changed, added, or deleted as the large presentation is being processed.
When multiple tasks share access to such a common resource, some mechanism must be provided to coordinate access to the shared resource as it may be modified asynchronously during processing of the multiple tasks. Presently known techniques may provide for a form of synchronization to assure that one task using a first version of a shared resource completes its processing before the shared resource is updated by any asynchronous event for use by other tasks. Such synchronization imposes a degree of serialization on the processing thus defeating the intended purpose of distributing the processing across a plurality of concurrent or parallel operating tasks. Other known techniques may generally involve utilizing a reference counter such as may be used in common filesystems where a user registers its access to the resource and later releases that access incrementing and decrement a total number of counts in a central location (e.g., within a file server or other centralized file management system). This reference counter increases and decreases as each task may access a resource and then release its access to the resource. When the reference counter is zero indicating that no task is presently utilizing the shared resource, the resource may be updated by the external source. Such a reference counter solution gives rise to a number of problems when the usage crosses multiple computing boundaries such as in a truly parallel processing environment for the multiple tasks. These and other typical, prior solutions generally result in loss of the desired performance generally attainable by operating multiple tasks concurrently and/or in parallel distributed over a plurality of processing nodes.
It is evident from the above discussion that an ongoing need exists for improving management of one or more shared resources in a multi-tasking document presentation environment.